package cn.sitia.wallet.service.impl;

import cn.sitia.wallet.domain.UserWallet;
import cn.sitia.wallet.domain.WalletTransaction;
import cn.sitia.wallet.enums.WalletTransactionType;
import cn.sitia.wallet.mapper.UserWalletMapper;
import cn.sitia.wallet.mapper.WalletTransactionMapper;
import cn.sitia.wallet.service.IUserWalletService;
import cn.sitia.wallet.service.IWalletTransactionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class WalletTransactionServiceImpl extends ServiceImpl<WalletTransactionMapper, WalletTransaction> implements IWalletTransactionService {
    /**
     * 查询用户钱包金额变动明细的接口
     */
    public List<WalletTransaction> getWalletTransactionHistory(int userId) {
        return  super.list(new QueryWrapper<WalletTransaction>().eq("user_id", userId));

    }
}
